/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.evl.tecinfo.gui;

/**
 *
 * @author Tecinfo
 */
public class Registrar_horaextra extends javax.swing.JFrame {

    /**
     * Creates new form Registrar_horaextra
     */int linha = -1;
    public Registrar_horaextra() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jb_add_hex = new javax.swing.JButton();
        jl_ano = new javax.swing.JLabel();
        ct_ano = new javax.swing.JTextField();
        jl_mes = new javax.swing.JLabel();
        ct_mes = new javax.swing.JTextField();
        jl_reg_horaextra = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jt_reg_horaextra = new javax.swing.JTable();
        bt_confir_horaextra = new javax.swing.JButton();

        jb_add_hex.setText("Adicionar");
        jb_add_hex.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jb_add_hexActionPerformed(evt);
            }
        });

        jl_ano.setText("Ano:");

        ct_ano.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ct_anoActionPerformed(evt);
            }
        });

        jl_mes.setText("Mês:");

        ct_mes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ct_mesActionPerformed(evt);
            }
        });

        jl_reg_horaextra.setText("Registrar Hora Extra");

        jt_reg_horaextra.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "Funcionario", "Atividades Complementares", "Hora Aula", "Horas", "Outros", "A Pagar"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                true, false, true, true, true, true
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(jt_reg_horaextra);

        bt_confir_horaextra.setText("Confirma");
        bt_confir_horaextra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_confir_horaextraActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(56, 56, 56)
                                .addComponent(jl_mes)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ct_mes, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jl_ano))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(ct_ano, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                    .addGap(134, 134, 134)
                                    .addComponent(jl_reg_horaextra))))
                        .addGap(18, 18, 18)
                        .addComponent(jb_add_hex))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(286, 286, 286)
                        .addComponent(bt_confir_horaextra))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 866, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(jl_reg_horaextra)
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jl_mes)
                    .addComponent(ct_mes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ct_ano, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jl_ano)
                    .addComponent(jb_add_hex))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(bt_confir_horaextra)
                .addGap(237, 237, 237))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jb_add_hexActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jb_add_hexActionPerformed
        // TODO add your handling code here
        
       jt_reg_horaextra.setVisible(true);
    }//GEN-LAST:event_jb_add_hexActionPerformed

    private void ct_anoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ct_anoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ct_anoActionPerformed

    private void ct_mesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ct_mesActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ct_mesActionPerformed

    private void bt_confir_horaextraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_confir_horaextraActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_bt_confir_horaextraActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Registrar_horaextra.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Registrar_horaextra.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Registrar_horaextra.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Registrar_horaextra.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Registrar_horaextra().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton bt_confir_horaextra;
    private javax.swing.JTextField ct_ano;
    private javax.swing.JTextField ct_mes;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JButton jb_add_hex;
    private javax.swing.JLabel jl_ano;
    private javax.swing.JLabel jl_mes;
    private javax.swing.JLabel jl_reg_horaextra;
    private javax.swing.JTable jt_reg_horaextra;
    // End of variables declaration//GEN-END:variables
}
